package com.ostraffel.recallvocabularybackend.DTO;

import com.fasterxml.jackson.annotation.JsonProperty;

public class UserConfig {
    // 传多个参数要用jackson配合空构造函数使用
    @JsonProperty("userId")
    String userId; // 用户id

    @JsonProperty("newWordNumber")
    int newWordNumber; // 新背单词数量

    @JsonProperty("recallWordNumber")
    int recallWordNumber; // 复习单词数量

    UserConfig(){

    }

    public UserConfig(UserConfigDetailed userConfigDetailed) {
        this.userId = userConfigDetailed.getUserId();
        this.newWordNumber = userConfigDetailed.getNewWordNumber();
        this.recallWordNumber = userConfigDetailed.getRecallWordNumber();
    }

    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public int getNewWordNumber() {
        return newWordNumber;
    }
    public void setNewWordNumber(int newWordNumber) {
        this.newWordNumber = newWordNumber;
    }
    public int getRecallWordNumber() {
        return recallWordNumber;
    }
    public void setRecallWordNumber(int recallWordNumber) {
        this.recallWordNumber = recallWordNumber;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("UserConfig{");
        sb.append("userId=").append(userId);
        sb.append(", newWordNumber=").append(newWordNumber);
        sb.append(", recallWordNumber=").append(recallWordNumber);
        sb.append('}');
        return sb.toString();
    }

}
